﻿$('#createForm').validate({
    rules: {
        Email: {
            required: true,
            email: true
        },
        Password: {
            required: true
        },
        ConfirmPassword: {
            required: true,
            equalTo: '#Password'
        }
    },
    messages: {
        Email: {
            required: "This field is required."
        },
        Password: {
            required: "This field is required."
        },
        ConfirmPassword: {
            required: "This field is required.",
            equalTo: "Passwords do not match."
        }
    },
    errorPlacement: function (label, element) {
        label.addClass('col-xs-4');
        label.insertAfter(element.parent());
    },
    wrapper: 'div'
});